package jiggle;

public class InverseSquareVertexEdgeRepulsionLaw extends VertexEdgeRepulsionLaw {

	public InverseSquareVertexEdgeRepulsionLaw (Graph g, double k) {
		super (g, k, 1);
	}

	public InverseSquareVertexEdgeRepulsionLaw (Graph g, double k, double s) {
		super (g, k, s);
	}

	@Override
    public double pairwiseWeights (double pref, double curr) {
		if (curr >= pref) return 0; else return cube (pref / curr) - pref / curr;
	}
}